import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
var store = new Vuex.Store({
    state:{
        username:localStorage.getItem('username')
    },
    mutations:{
        setUserName(state,date){
            state.username = date
            localStorage.setItem('username',date)   
        }
    },
    // getters:{
    //     getUsername:(data)=>state.username
    // },
    actions:{},
    modules:{}
})
export default store
